
export const BrandTypeEnum = {
  '1': '在营',
  '2': '未开业'
}
export const BrandBusinessTypeEnum = {
  '1': '商铺合同',
  '2': '商铺合同'
}
export const BrandJoinTypeEnum = {
  '1': '自营',
  '2': '连锁'
}
export const BrandStatusEnum = {
  '1': '合作中',
  '2': '未合作'
}
export const brandFilter = {
  create: {
    in: (params) => {
      console.log('add brand = ', params);
      const {
        brandId,
        brandName,
        brandType,
        brandStatus,
        brandJoinType,
        brandBusinessType,
        projectId
      } = params;

      return {
        brand_id: brandId,
        brand_name: brandName,
        brand_type: brandType,
        brand_status: brandStatus,
        brand_join_type: brandJoinType,
        brand_business_type: brandBusinessType,
        project_id: projectId
      };
    },
    out: res => res,
  },
  update: {
    in: params => {
      console.log('update brand = ', params);
      const {
        id,
        brandId,
        brandName,
        brandType,
        brandStatus,
        brandJoinType,
        brandBusinessType,
        projectId
      } = params;

      return {
        id,
        brand_id: brandId,
        brand_name: brandName,
        brand_type: brandType,
        brand_status: brandStatus,
        brand_join_type: brandJoinType,
        brand_business_type: brandBusinessType,
        project_id: projectId
      };
    },
    out: res => res,
  },
  query: {
    in: params => params,
    out: res => res,
  },
  remove: {
    in: params => {
      console.log('remove brand = ', params);

      return params;
    },
    out: res => res
  },
}

